<template>
  <el-dropdown v-if="devMode"
               @command="executeCommand">
    <span>
      <span>{{prop.name}}</span>
    </span>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item command="configProperty">配置属性</el-dropdown-item>
      <el-dropdown-item command="cloneProperty" divided>克隆属性</el-dropdown-item>
      <el-dropdown-item command="deleteProperty" style="color: #F56C6C">删除属性</el-dropdown-item>
    </el-dropdown-menu>
    <el-dialog :visible.sync="openConfig"  width="1200px" append-to-body v-if="openConfig">
      <template slot="title">
        配置属性<el-tag>{{prop.name}}</el-tag>
      </template>
      <rva-tcrud appId="tcrud3_rva_viewproperty" :requestParams="{rvaAppParams: prop}"></rva-tcrud>
    </el-dialog>
    <el-dialog :visible.sync="openClone" width="900px" append-to-body v-if="openClone">
      <template slot="title">
        克隆属性<el-tag>{{prop.name}}</el-tag>
      </template>
      <rva-form viewId="c9_rva_viewproperty" :requestParams="{rvaAppParams: prop}" @rva-button-click="handleFormButtonClick"
      ></rva-form>
    </el-dialog>
  </el-dropdown>
  <span v-else>{{prop.name}}</span>
</template>

<script>

import config from '@/api/rva/config'
export default {
  mixins: [config]
};
</script>
